<?php
class NavigationWidget extends BaseWidget{
	public function get_data(){
		$id = $this->config['id'];
		$mod = new NavigateModel();
		$navs = $mod->get_by_attrs(array('site_id'=>SITE_ID, 'code'=>$id));
		$navs['items'] = SortHelper::sortByCol($navs['items'], 'rank');
		return array(
			'navs' => $navs['items']
		);
	}
	
	public function get_info(){
		return array(
			'name' => '导航组件',
			'desc' => '',
		);
	}
}

?>